<div class="portlet">
    <form class="portlet-search-body" name="queryForm">
        <input type="text" class="form-control search-item" ng-model="lineName" placeholder="线路名称名称">
        <div class="search-item">
            <button class="btn btn-icon-only default"><i class="fa fa-chevron-right"></i></button>
            <button class="btn btn-sm query" ng-click="dispatchGrid.query();"><i class="fa fa-search"></i> 查询</button>
            <button class="btn btn-sm reset" ng-click="dispatchGrid.reset();"><i class="fa fa-eraser"></i> 重置</button>
        </div>
    </form>
    <div class="portlet-body">
        <table ed-grid="dispatchGrid" class="table table-striped table-bordered table-advance table-hover"
               data-options="url: 'linePlan/query.do', modelText: '线路方案', form: 'queryForm', modal: 'modal'">
            <thead>
            <tr>
                <th data-options="field: '_index'"></th>
                <th data-options="field: 'planId'">方案id</th>
                <th data-options="field: 'lineName'">线路名称</th>
                <th data-options="field: 'departTime'">发车时间</th>
                <th>操作</th>
            </tr>
            </thead>
        </table>
    </div>
</div>

<div ed-modal="allocationModal" data-options="title: '方案调度', static: true, width: 720, defaultButton:false,onHidden:'reset'">
    <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="validateForm">

		<div class="form-group">
            <input type="hidden" name="hiddenInput">
            <label class="col-md-2 control-label"><span class="required">*</span>发车日期 </label>
            <div class="col-md-4">
                <input type="text" class="form-control" name="departDate" ed-date-picker
                       ng-model="departDate" ng-change="dispatchGrid.changeDepartDate()" required>
            </div>
        </div>
        <div class="form-body">
            <div class="form-group">
                <label class="col-md-2 control-label">司机</label>
                <div class="col-md-10">
               	 	<table style="border: 2px solid #ccc;width:100%;">
	               	 	<tr style="width:100%">
	               	 	 	<td style="padding: 5px;border: 2px solid #ccc;width:70%">
				              	<span ng-repeat="driver in driverList"  style="overflow:hidden;text-overflow:ellipsis;white-space: nowrap;display:inline-block;margin-right: 5px;background-color: #efeaea;" >
					              	<input ng-if="driver.hasChoice" name="drivers" type="checkbox" value="{{driver.driverNo}}"   checked ="checked"/> 
					              	<input ng-if="!driver.hasChoice" name="drivers" type="checkbox" value="{{driver.driverNo}}"/> 
					              	{{driver.driverName}}(<i class="fa fa-mobile"></i>:{{driver.driverPhone}})&nbsp;
				              	</span>
	               	 	 	</td>
	               	 	</tr>
               	 	</table>
                </div>
            </div>
        </div>
        
        <div class="form-body">
            <div class="form-group">
                <label class="col-md-2 control-label">车辆</label>
                <div class="col-md-10">
               	 	<table style="border: 2px solid #ccc;width:100%;">
	               	 	<tr style="width:100%">
	               	 	 	<td style="padding: 5px;border: 2px solid #ccc;width:70%">
				              	<span ng-repeat="vehicle in vehicleList"  style="overflow:hidden;text-overflow:ellipsis;white-space: nowrap;display:inline-block;margin-right: 5px;background-color: #efeaea;" >
					              	<input ng-if="vehicle.hasChoice" name="vehicles" type="checkbox" value="{{vehicle.vehicleNo}}"   checked ="checked"/> 
					              	<input ng-if="!vehicle.hasChoice" name="vehicles" type="checkbox" value="{{vehicle.vehicleNo}}"/> 
					              	{{vehicle.vehicleNo}}&nbsp;
				              	</span>
	               	 	 	</td>
	               	 	</tr>
               	 	</table>
                </div>
            </div>
        </div>

        <div class="form-actions">
            <button type="button" class="btn blue" w5c-form-submit="dispatchGrid.saveDriver()" >
                <i class="fa fa-save"></i> 保存
            </button>
            <button type="button" class="btn default" ng-click="allocationModal.hide();">
                <i class="fa fa-times"></i> 取消
            </button>
        </div>
    </form>
</div>
